import { type App } from 'vue';

import AppPage from '@/components/AppPage';
import InputNumber from '@/components/InputNumber';
import SearchArea from '@/components/SearchArea';
import PageCard from '@/components/PageCard';
import ConditionSelect from '@/components/ConditionSelect';
import ProTabs from '@/components/ProTabs';
import ProSelect from '@/components/ProSelect';
import ProTable from '@/components/ProTable';
import ProForm from '@/components/ProForm';
import ProTableColumnSwitch from '@/components/ProTableColumnSwitch';
import ProTableColumnConfig from '@/components/ProTableColumnConfig';
import ResponsiveRow from '@/components/ResponsiveRow';
import StatusLabel from '@/components/StatusLabel';
import CountTo from '@/components/CountTo';
import { SliderRotateCaptcha, SliderCaptcha } from '@/components/Captcha';
import SpineText from '@/components/SpineText';
import TreeLine from '@/components/TreeLine';
import TypeIt from '@/components/TypeIt';
import SplitPanel from '@/components/SplitPanel';
import TextScroll from '@/components/TextScroll';
import Pagination from '@/components/Pagination';
import CopyButton from '@/components/CopyButton';
import SvgIcon from '@/components/SvgIcon';
import WangEditor from '@/components/WangEditor';
import IconSelect from '@/components/IconSelect';
import { LockScreen, LockScreenModal } from '@/components/LockScreen';
import CheckCard from '@/components/CheckCard';

// 原来的组件
import FileUpload from '@/components/Upload/FileUpload.vue';
import MultiImageUpload from '@/components/Upload/MultiImageUpload.vue';
import SingleImageUpload from '@/components/Upload/SingleImageUpload.vue';
import Dict from '@/components/Dict/index.vue';
import DictLabel from '@/components/Dict/DictLabel.vue';

export default function setupComponents(app: App) {
  app.use(AppPage);
  app.use(ProForm);
  app.use(ResponsiveRow);
  app.use(ProTabs);
  app.use(ProSelect);
  app.use(ProTable);
  app.use(ProTableColumnSwitch);
  app.use(ProTableColumnConfig);
  app.use(SearchArea);
  app.use(ConditionSelect);
  app.use(StatusLabel);
  app.use(PageCard);
  app.use(InputNumber);
  app.use(CountTo);
  app.use(SliderCaptcha);
  app.use(SliderRotateCaptcha);
  app.use(SpineText);
  app.use(TreeLine);
  app.use(TypeIt);
  app.use(SplitPanel);
  app.use(TextScroll);
  app.use(Pagination);
  app.use(CopyButton);
  app.use(SvgIcon);
  app.use(WangEditor);
  app.use(IconSelect);
  app.use(LockScreen);
  app.use(LockScreenModal);
  app.use(CheckCard);

  // 原来的组件
  app.component('FileUpload', FileUpload);
  app.component('MultiImageUpload', MultiImageUpload);
  app.component('SingleImageUpload', SingleImageUpload);
  app.component('Dict', Dict);
  app.component('DictLabel', DictLabel);
}
